#ifndef PSOG_RUNNER_H
#define PSOG_RUNNER_H

#include <vector>
#include "PSORunner.h"
#include "..\CoverageTable.h"

using namespace std;


class PSOGRunner:public PSORunner{
	double percent;          //while coverage is more than this value, we start to use greedy alg
	vector<vector<int>> para;
	CoverageTable *table;
public:
	PSOGRunner(double weight, double c1, double c2, int iterNum,double per, CoverageTable *ct);
	~PSOGRunner();
	int CheckPara(CoverageTable *ct);
	int run(vector<vector<int>>&, vector<int>&);
	void run_greedy(vector<int>&, vector<int>&);
	void InitPara(vector<int>&);
	int GetMaxUnCov(vector<int>&);
	int UnCoveredComb(vector<int>& arr, vector<int>& ca, int index, int value, int Fst, int FValue);
	void GenRanArray(vector<int>& arr, int size, int FIndex);
};

#endif